import request from '@/router/axios';

export const getBatchList = () => {
  return request({
    url: '/api/medpurBatch/getBatchList',
    method: 'get'
  })
}

export const getInsList = () => {
  return request({
    url: '/api/institution/getInsList',
    method: 'get'
  })
}

export const getAddList = (params) => {
  return request({
    url: '/api/batchOrderItem/getAddList',
    method: 'get',
    params: params
  })
}

export const getUpdateList = (params) => {
  return request({
    url: '/api/batchOrderItem/getUpdateList',
    method: 'get',
    params: params
  })
}

export const getList = (current, size, params) => {
  return request({
    url: '/api/batchOrderItem/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/blade-batchOrderItem/batchOrderItem/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/blade-batchOrderItem/batchOrderItem/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const submit = (row) => {
  return request({
    url: '/api/batchOrder/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/batchOrder/update',
    method: 'post',
    data: row
  })
}

